package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.SysVendor;
import com.ruoyi.system.mapper.SysVendorMapper;
import com.ruoyi.system.service.ISysVendorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysVendorImpl implements ISysVendorService {

    @Autowired
    private SysVendorMapper sysVendorMapper;


    @Override
    public int insertVendorMapper(SysVendor sysVendor) {

        return sysVendorMapper.insertVendorMapper(sysVendor);
    }

    @Override
    public int deleteVendorMapper(Integer oid) {
        return sysVendorMapper.deleteVendorMapper(oid);
    }

    @Override
    public int deleteVendorsMapper(String oids) throws Exception {
        Integer[] vendorIds = Convert.toIntArray(oids);
        //return userMapper.deleteUserByIds(userIds);
        return sysVendorMapper.deleteVendorsMapper(vendorIds);
    }


    @Override
    public int updateVendorMapper(SysVendor sysVendor) {
        return sysVendorMapper.updateVendorMapper(sysVendor);
    }

    @Override
    public SysVendor selectVendorByOid(Integer oid) {
        return sysVendorMapper.selectVendorByOid(oid);
    }

    @Override
    public List<SysVendor> selectVendorList(SysVendor sysVendor) {
        return sysVendorMapper.selectVendorList(sysVendor);
    }

    @Override
    public List<SysVendor> selectVendorListDesc(SysVendor sysVendor) {
        return sysVendorMapper.selectVendorListDesc(sysVendor);
    }

    @Override
    public List<SysVendor> searchVendor(SysVendor sysVendor) {
        return sysVendorMapper.searchVendor(sysVendor);
    }

    @Override
    public List<SysVendor> searchVendorDesc(SysVendor sysVendor) {
        return sysVendorMapper.searchVendorDesc(sysVendor);
    }

    @Override
    public int checkUnique(SysVendor sysVendor) {
        return sysVendorMapper.checkUnique(sysVendor);
    }

    @Override
    public int effectivePassed(SysVendor sysVendor) {
        return sysVendorMapper.effectivePassed(sysVendor);
    }
}
